/**
 * @Author 12629
 * @Description：
 */
public class Test {

    public String toLowerCase(String s) {
        StringBuilder stringBuilder = new  StringBuilder();
        for(int i = 0;i < s.length();i++) {
            char ch = s.charAt(i);
            //1.先得判断是字母
            if(Character.isLetter(ch)) {
                //2.判断是不是大写
                if(Character.isUpperCase(ch)) {
                    ch = (char)(ch + 32);
                }
            }
            stringBuilder.append(ch);
        }
        return stringBuilder.toString();
    }

    public static void func1(int[] array) {
        array = new int[10];
    }
    public static void func2(int[] array) {
        array[0] = 9;
    }

    public static void swap(int a,int b) {
        int tmp = a;
        a = b;
        b = tmp;
    }
    public static void swap2(MyValue myV1,MyValue myV2) {
        int tmp = myV1.val;
        myV1.val = myV2.val;
        myV2.val = tmp;
    }

    public static void main(String[] args) {
        int count = 0;
        String s = "a    c";
        String[] ret = s.split(" ");
        for (int i = 0; i < ret.length; i++) {
            if(ret[i].length()!=0) {
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main1(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;
        MyValue myValue2 = new MyValue();
        myValue2.val = 20;
        System.out.println(myValue1.val + " " + myValue2.val);
        swap2(myValue1,myValue2);
        System.out.println(myValue1.val +  " " + myValue2.val);


        StringBuffer stringBuffer = new StringBuffer("hello");

        String s = "ababcdef";
        System.out.println(s.contains("abc"));
    }
}
